package com.baibei.ebec.sdk;

import com.baibei.model.DeliveryQueryInfo;
import com.baibei.model.OrderInfo;
import com.baibei.model.PaymentRecordInfo;
import com.baibei.model.SumClosedOrderInfo;
import com.baibei.sdk.Empty;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * 订单接口
 * 账单：交易记录
 * Created by shenminjie on 2017/8/9.
 * mail:shenminjie@100bei.com
 */

public interface IOrderApi {

    /**
     * 获取订货记录
     *
     * @param currentPage currentPage
     * @param pageSize    pageSize
     * @return
     */
    @POST(ApiConstant.API_BILL_TRADE)
    @FormUrlEncoded
    Observable<List<OrderInfo>> getOrderRecordList(@Field("page") int page);

    /**
     * 获取订单列表
     *
     * @return return
     */
    @POST(ApiConstant.API_QUERY_ORDER)
    Observable<List<OrderInfo>> getOrderList();


    /**
     * 获取收支记录
     *
     * @param page page
     * @return return
     */
    @POST(ApiConstant.API_QUERY_MONEY_LOG_LIST)
    @FormUrlEncoded
    Observable<List<PaymentRecordInfo>> getMoneyLogList(@Field("page") int page);

    /**
     * 获取订单统计的数量
     *
     * @return return
     */
    @POST(ApiConstant.API_QUERY_ORDER_SUM)
    Observable<SumClosedOrderInfo> getSumClosedOrder();

    /**
     * 获取补款取货记录
     *
     * @return return
     */
    @POST(ApiConstant.API_DELIVERY_QUERY)
    Observable<List<DeliveryQueryInfo>> getDeliveryQueryInfos();

//    /**
//     * 修改止盈线
//     */
//    @POST(ApiConstant.API_RESET_TOP_LIMIT)
//    Observable<Empty> resetTopLimit(@Field("orderId") String orderId,
//                                    @Field("toplimit") String toplimit);

}
